package com.bluesky.plum.uimodels.standard.components.validator;

import com.bluesky.plum.uimodels.standard.StandardUIComponentType;
import com.bluesky.plum.uimodels.standard.UIComponent;
import com.bluesky.plum.validate.validator.RegExpValidator;
import com.bluesky.plum.validate.validator.RequiredValidator;

/**
 * 
 * @author jack
 * 
 */
public class RegExpComponentValidator extends ComponentValidator {
	
	private String regularExpression;

	@Override
	public void initialize() {

		super.initialize();

		label.setCaption(description);

		RegExpValidator regExpValidator = new RegExpValidator();

		regExpValidator.setRegexp(regularExpression);

		validator = regExpValidator;
	}

	

	public String getRegularExpression() {
		return regularExpression;
	}

	public void setRegularExpression(String regularExpression) {
		this.regularExpression = regularExpression;
	}

}
